namespace MoreLinq.Test;

using System;
using System.Collections.Generic;

class BreakingCollection<T>(IList<T> list) :
    BreakingSequence<T>, ICollection<T>
{
    public BreakingCollection(params T[] values) : this((IList<T>)values) { }

    protected IList<T> List { get; } = list;

    public int Count => List.Count;

    public void Add(T item) => throw new NotImplementedException();
    public void Clear() => throw new NotImplementedException();
    public bool Contains(T item) => List.Contains(item);
    public void CopyTo(T[] array, int arrayIndex) => List.CopyTo(array, arrayIndex);
    public bool Remove(T item) => throw new NotImplementedException();
    public bool IsReadOnly => true;
}
